package com.gx.smart.construction.ui.home.fragment;

import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;

import androidx.databinding.DataBindingUtil;

import com.blankj.utilcode.util.ActivityUtils;
import com.gx.smart.base.BaseMVVMFragmentV2;
import com.gx.smart.construction.R;
import com.gx.smart.construction.databinding.MineFragmentBinding;
import com.gx.smart.construction.ui.home.viewmodel.MineViewModel;
import com.gx.smart.construction.ui.modify.activity.ModifyPasswordActivity;
import com.gx.smart.construction.ui.setting.activity.SettingActivity;

public class MineFragment extends BaseMVVMFragmentV2<MineViewModel> {

    private MineFragmentBinding dataBinding;

    @Override
    public int onBindLayout() {
        return R.layout.mine_fragment;
    }

    @Override
    public String getToolbarTitle() {
        return "";
    }

    @Override
    protected Class<MineViewModel> onBindViewModel() {
        return MineViewModel.class;
    }

    @Override
    public void initContentView(ViewGroup root) {
        dataBinding = DataBindingUtil.inflate(getLayoutInflater(), onBindLayout(), root, true);
        dataBinding.setMineFragment(this);
    }

    public void modifyPassword(View v) {
        ActivityUtils.startActivity(new Intent(getActivity(), ModifyPasswordActivity.class));
    }

    public void settings(View v) {
        ActivityUtils.startActivity(new Intent(getActivity(), SettingActivity.class));
    }


    @Override
    public boolean getLeft() {
        return false;
    }


}
